home *** CD-ROM | disk | FTP | other *** search
- UNIT AddrKey;
- (****************************************************************)
- (* AddrKey By C. Franz *)
- (* Copyright (c) 1990, By Carl Franz & JFL Consulting *)
- (* *)
- (* AddrKey *)
- (* *)
- (* Purpose: Create a Database key from a structure of type *)
- (* ADDRTYPE. Using this key or part of it you can *)
- (* find addresses from as little as the zip-code *)
- (* and the street name or number. *)
- (* *)
- (* It will throw out address buzz words (see lists *)
- (* in ADDRKEYL) in an attempt to find the street *)
- (* number, name, apartment number (if any), and *)
- (* turn the mess into a hash key. It works fairly *)
- (* well. If you have a better idea you can easily *)
- (* modify the code to suit your needs. *)
- (* *)
- (****************************************************************)
-
- INTERFACE
-
- USES KeyTools;
-
- TYPE
- AddrType = RECORD {standard address record description}
- Addr1 : String[40];
- Addr2 : String[40];
- City : String[15];
- State : String[2];
- Zip : string[5];
- END;
-
- KeyStruct = RECORD {AddrKey elements before being turned into a STRING }
- Zip : String[5];
- Street : string[5];
- StNum : integer;
- Apt : byte;
- END;
-
- VAR AKKey : keystruct;
-
- FUNCTION AddrToKeyT(Address : AddrType) : String;
-
- FUNCTION AddrToKey(Addr1, Addr2, Zip : String) : String;
-
- IMPLEMENTATION
-